package webservices;

public class CustomerProxy implements webservices.Customer {
  private String _endpoint = null;
  private webservices.Customer customer = null;
  
  public CustomerProxy() {
    _initCustomerProxy();
  }
  
  public CustomerProxy(String endpoint) {
    _endpoint = endpoint;
    _initCustomerProxy();
  }
  
  private void _initCustomerProxy() {
    try {
      customer = (new webservices.CustomerServiceLocator()).getcustomer();
      if (customer != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)customer)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)customer)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (customer != null)
      ((javax.xml.rpc.Stub)customer)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public webservices.Customer getCustomer() {
    if (customer == null)
      _initCustomerProxy();
    return customer;
  }
  
  public beans.Customer_Rentals dummy() throws java.rmi.RemoteException{
    if (customer == null)
      _initCustomerProxy();
    return customer.dummy();
  }
  
  public beans.Customer getProfile(java.lang.String c_Id) throws java.rmi.RemoteException{
    if (customer == null)
      _initCustomerProxy();
    return customer.getProfile(c_Id);
  }
  
  public beans.Customer[] getAllCustomers() throws java.rmi.RemoteException{
    if (customer == null)
      _initCustomerProxy();
    return customer.getAllCustomers();
  }
  
  public beans.Customer[] searchCustomers(java.lang.String key, java.lang.String value) throws java.rmi.RemoteException{
    if (customer == null)
      _initCustomerProxy();
    return customer.searchCustomers(key, value);
  }
  
  public int updateCustomerInfo(java.lang.String c_Id, java.lang.String key, java.lang.String value) throws java.rmi.RemoteException{
    if (customer == null)
      _initCustomerProxy();
    return customer.updateCustomerInfo(c_Id, key, value);
  }
  
  public int deleteCustomer(java.lang.String c_Id) throws java.rmi.RemoteException{
    if (customer == null)
      _initCustomerProxy();
    return customer.deleteCustomer(c_Id);
  }
  
  public beans.Movie retrieveMovie(java.lang.String m_Id, java.lang.String column_Name) throws java.rmi.RemoteException{
    if (customer == null)
      _initCustomerProxy();
    return customer.retrieveMovie(m_Id, column_Name);
  }
  
  public beans.Movie[] retrieveAllMovies() throws java.rmi.RemoteException{
    if (customer == null)
      _initCustomerProxy();
    return customer.retrieveAllMovies();
  }
  
  public java.lang.String signIn(java.lang.String username, java.lang.String password) throws java.rmi.RemoteException{
    if (customer == null)
      _initCustomerProxy();
    return customer.signIn(username, password);
  }
  
  public int createMovie(java.lang.String m_Id, java.lang.String m_Title, java.lang.String m_Banner, java.lang.String m_Release_Year, java.lang.String m_Rental_Price, java.lang.String m_Category, int m_Available_Copies, java.lang.String m_Description) throws java.rmi.RemoteException{
    if (customer == null)
      _initCustomerProxy();
    return customer.createMovie(m_Id, m_Title, m_Banner, m_Release_Year, m_Rental_Price, m_Category, m_Available_Copies, m_Description);
  }
  
  public beans.Movie[] searchMovies(java.lang.String key, java.lang.String value) throws java.rmi.RemoteException{
    if (customer == null)
      _initCustomerProxy();
    return customer.searchMovies(key, value);
  }
  
  public int updateMovie(java.lang.String m_Id, java.lang.String key, java.lang.String value) throws java.rmi.RemoteException{
    if (customer == null)
      _initCustomerProxy();
    return customer.updateMovie(m_Id, key, value);
  }
  
  public int deleteMovie(java.lang.String m_Id) throws java.rmi.RemoteException{
    if (customer == null)
      _initCustomerProxy();
    return customer.deleteMovie(m_Id);
  }
  
  public int issueMovie(java.lang.String c_Id, java.lang.String m_Id, java.lang.String CR_Date_Out, java.lang.String CR_Date_Returned, java.lang.String CR_Rental_Id) throws java.rmi.RemoteException{
    if (customer == null)
      _initCustomerProxy();
    return customer.issueMovie(c_Id, m_Id, CR_Date_Out, CR_Date_Returned, CR_Rental_Id);
  }
  
  public int returnMovie(java.lang.String CR_Rental_Id) throws java.rmi.RemoteException{
    if (customer == null)
      _initCustomerProxy();
    return customer.returnMovie(CR_Rental_Id);
  }
  
  public int signUp(java.lang.String c_Id, java.lang.String c_First_Name, java.lang.String c_Last_Name, java.lang.String c_Email, java.lang.String c_Address, java.lang.String c_City, java.lang.String c_State, java.lang.String c_Zipcode, int c_Premium, java.lang.String c_Username, java.lang.String c_Password, java.lang.String c_Security_Question, java.lang.String c_Security_Answer) throws java.rmi.RemoteException{
    if (customer == null)
      _initCustomerProxy();
    return customer.signUp(c_Id, c_First_Name, c_Last_Name, c_Email, c_Address, c_City, c_State, c_Zipcode, c_Premium, c_Username, c_Password, c_Security_Question, c_Security_Answer);
  }
  
  
}